import configparser
class Config:
    def __init__(self):
        self.path = "./resource/config.ini"
        self.iniHandle = configparser.ConfigParser()  # 生成句柄
        self.iniHandleReadPermission = self.iniHandle.read(self.path,encoding='gbk')

    def getDas(self):
        return self.iniHandleReadPermission

    def getValue(self, Option, KeyName):
        return self.iniHandle.get(Option, KeyName)

    def setDas(self, Option, Key, Value):
        print(Value)
        self.iniHandle.set(Option, Key, Value)
        self.iniHandle.write(open(self.path, 'w'))